interviewbit with Python questions solutions

34

class Student:
    def __init__(self, name, branch):
        self.name = name
        self.branch = branch
obj = Student("Robin", "CSE")
print(obj.name)
print(obj.branch)

Comments

Submit
0 Comments